export default {
	//服务器地址
	server: 'http://192.168.0.76:9000',
	// 接口地址
	interface: 'http://192.168.0.56:8080',
	// interface: 'http://192.168.0.64:8080',
	// 获取图片资源
	getImage: (name) => 'http://192.168.0.76:9000/applet/images/' + name + '.png',
	// 是否需要登录
	isLogin: true,
	//是否需要权限
	isLimits: true,
	encryptionChange: (str) => {
		if (str.length === 0) return str;
		if (str.length == 11 || str.length == 18) {
			const start = str.slice(0, 3);
			const end = str.slice(-4);
			const maskedLength = str.length - 7;
			const masked = '*'.repeat(maskedLength);
			return start + masked + end;
		} else {
			if (str.length === 1) {
				return '*';
			} else if (str.length === 2) {
				return str.charAt(0) + '*';
			} else {
				let replaceCount = Math.floor((str.length - 1) / 2);
				let startIndex = Math.ceil(str.length / 2) - replaceCount;
				return str.substring(0, startIndex) + '*'.repeat(replaceCount) + str.substring(startIndex +
					replaceCount);
			}
		}
	},
}